<style type="text/css">
.storelogo img{width:3.2rem;height:3.2rem}
.merchgroup .store-star {padding:0.1rem 0 0.2rem 0;font-size:0.65rem;line-height:1rem}
.merchgroup .store-star img{height:0.66rem}
.star-on,.star-off{position:absolute;top:1rem;left:0;overflow:hidden}
.star-rate {margin-left:0.3rem}
.store-distance{float:right;color:#999}
.store-moneylimit{font-size:0.75rem}
.star .shine {
    color: red;
}
</style>
<div class="fui-page  fui-page-current page-goods-list" ng-if="pagedata.showarea !=1">
<div class="fui-content" style="top:0">
<div class="fui-header">
		<div class="fui-header-left" ng-click="pagedata.showarea =1">
			<span ng-show="pagedata.pcd.district" style="font-size:0.65rem">{{pagedata.pcd.district}}</span>
			<span ng-show="!pagedata.pcd.district" style="font-size:0.65rem">{{pagedata.pcd.city || '广州市'}}</span>
			<i class="icon jinyunicon icon-moreunfold"></i>
		</div>
		<div class="fui-header-input">
				<div class="searchbar searchbar-active" style="margin-left:3.2rem;margin-right:0">
					<div class="search-input">
						<i id="searchsub"  ng-click="tool.get_list('getlist',true)" class="icon jinyunicon icon-search" style="font-size: 1.0rem;"></i>
						<input ng-model="pagedata.params.keyword" type="search" id="search" placeholder="输入关键字..." value="">
					</div>
				</div>
		</div>
		<!--
		<div class="fui-header-right" data-nomenu="true">
			<a href="javascript:;"><i class="icon jinyunicon icon-saoyisao2" id="listblock" style="font-size: 1.0rem;"></i></a>
		</div>
		-->
</div>
<div id="carousel-container" class="carousel slide" data-role="carousel" data-param-auto="true" style="margin-top:2.2rem">
			<div class="carousel-inner" role="listbox" style="height:6rem">
		<div ng-class="{'item':1,'active':$index==0}" ng-repeat="item in pagedata.setting.image">
			
			<a href="{{item.url}}">
				<img src="{{tomedia(item.picurl) || '../core/resource/images/banner-1.jpg'}}" style="display: block; width: 100%; height: 100%;">
			</a>
		</div>
		</div>
			<style>
					.fui-swipe-page .fui-swipe-bullet {background: {background}; opacity: {opacity};}
					.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;}
			</style>
			<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 5px; bottom: 10px; ">
				<div class="fui-swipe-bullet" ng-repeat="item in pagedata.setting.image" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
			</div>
</div>
<div ng-if="pagedata.setting.notice" class="line-notice" style="padding:0.5rem">
	<div class="line-notice-label"><i class="icon icon-seeraudio"></i></div>
	<div class="line-notice-animation" style="display: flex;">
		<div class="line-animation">{{pagedata.setting.notice}}</div>
	</div>
</div>
<div class="fui-icon-group noborder col-{{pagedata.setting.bankuainum||4}} radius" style="background: #ffffff">
    <a class="fui-icon-col external" ng-repeat="item in pagedata.bankuai1" href="javascript:;" ng-click="access_json('jy_gohome/sever/list/categoryid='+item.id)" data-nocache="true">
            <div class="icon"><img src="{{tomedia(item.image) || '../core/resource/images/nopic.jpg'}}"></div>
            <div class="text" style="color: #666666;">{{item.title}}</div>
    </a>
</div>
<div class="fui-icon-group noborder col-5"  style="background: #ffffff">
       <div class="fui-icon-col external" ng-repeat="item in pagedata.setting.bankuai2" ng-if="item.is_install!=1" style="margin-top:0.2rem 0 0 0" ng-click="access_json(item.action)">
                    <div class="badge" style="background-color: #f60;"></div>
                    <div class="icon icon-green radius" style="height:36px;line-height:36px"><i class="icon {{item.icon}}" style="color: {{item.color}};font-size:22px;"></i></div>
                    <div class="text" style="font-size:0.55rem;">{{item.title}}</div>
       </div>
</div>
<div ng-if="pagedata.worker_show.length>0" class="fui-line" style="width:6rem;margin:0.5rem auto 0 auto">
	<div class="text text-danger" style="background-color:#f9f9f9" >明星技师</div>
</div>
<div ng-if="pagedata.worker_show.length>0" class="fui-tab-scroll" style="height: 3.6rem">
			<div class='xcontainer' style="z-index:0;height: 3.6rem;padding:0.3rem">
			    <div ng-repeat="item in pagedata.worker_show" ng-click="access_json('jy_gohome/worker/detail/id='+item.id)" style="width:40px;float:left;text-align:center;margin:.2rem">
					<div class="weui_cells_radio3" style="width:100%">
						<img class="img-circle"  src="{{tomedia(item.headimg) || '../core/resource/images/nopic.jpg'}}" width="40" height="40">
					</div>
					<div>
						<span style="font-size:0.5rem">{{item.name}}</span>
					</div>
				</div>
			</div>
</div>
<div ng-if="pagedata.serve_show.length>0" class="fui-line" style="width:6rem;margin:0.5rem auto 0 auto">
	<div class="text text-danger" style="background-color:#f9f9f9" >推荐服务</div>
</div>
<div ng-if="pagedata.serve_show.length>0" class="fui-list-group merchgroup" ng-repeat="item in pagedata.serve_show">
            <div class="fui-list">
                <a class="fui-list-media storelogo" href="javascript:;" ng-click="access_json('jy_gohome/sever/sever_detail/id='+item.id)">
                    <img class="round" ng-src="{{tomedia(item.image) || '../core/resource/images/nopic.jpg'}}">
                </a>
                <a class="fui-list-inner" style="margin-top:0.16rem" href="javascript:;" ng-click="access_json('jy_gohome/sever/sever_detail/id='+item.id)">
                    <div class="title" style="font-size:0.76rem">{{item.title}}</div>
                    <div class="store-star">
						<span class="star star1">
									<span ng-class="{'shine':item.star >= 1}"><i class="icon icon-shoucang-tianchong"></i></span>
									<span ng-class="{'shine':item.star >= 2}"><i class="icon icon-shoucang-tianchong"></i></span>
									<span ng-class="{'shine':item.star >= 3}"><i class="icon icon-shoucang-tianchong"></i></span>
									<span ng-class="{'shine':item.star >= 4}"><i class="icon icon-shoucang-tianchong"></i></span>
									<span ng-class="{'shine':item.star >= 5}"><i class="icon icon-shoucang-tianchong"></i></span>
						</span>
						<!--<span class="star-rate">{{item.star}}</span>-->
						<span>服务{{item.num}}个客户</span>
					</div>
					<div class="subtitle" style="font-size:0.55rem">
						<div class="store-moneylimit">
						  <span>人均{{item.price}}</span>
						  <span class="store-distance"> 服务时间：约{{item.times}}分钟</span>
						</div>
					</div>
                </a>
            </div>
</div>
</div>
</div>
<div class="fui-page  fui-page-current page-goods-list" ng-if="pagedata.showarea ==1">
<div class="fui-header">
		<div class="fui-header-left" ng-click="pagedata.showarea =0">
			<a class="back"></a>
		</div>
		<div class="fui-header-input">
				<div class="searchbar searchbar-active">
					<div class="search-input">
						<i class="icon jinyunicon icon-search" style="font-size: 1.0rem;"></i>
						<input type="search" id="search" placeholder="输入关键字..." value="">
					</div>
				</div>
		</div>
		<div class="fui-header-right" data-nomenu="true">
			<a href="javascript:;"><i class="icon jinyunicon icon-saoyisao2" id="listblock" style="font-size: 1.0rem;"></i></a>
		</div>
</div>
<div class="fui-content" style="top:1.3rem">
		<div class="weui_cells weui_cells_access">
				<a class="weui_cell" href="javascript:;">
					<div class="weui_cell_bd weui_cell_primary" style="padding:0">
						<span>当前定位/选择地区：{{pagedata.pcd.city || '广州市'}}</span>
					</div>
					<div class="weui_cell_ft" ng-click="toogle(post,'show')">
						选择县区
					</div>
				</a>
				<div class="row margin0" ng-show="post.show">
						<div class="jy-3" ng-repeat="value in pagedata.province[pagedata.pcd.province][pagedata.pcd.city]">
							<div class="yuyue-duan" style="width:auto" ng-click="selectarea(pagedata.pcd.province,pagedata.pcd.city,value);pagedata.showarea = 0;">
									<div>{{value}}</div>
									<div class="clear"></div>
							</div>
						</div>
				</div>
			</div>
			<div class="weui_cells_title">热门地区</div>
			<div class="weui_cells">
				<div class="row margin0">
					<div class="jy-3">
							<div class="yuyue-duan" style="width:auto" ng-click="selectarea('广东省','深圳市','');pagedata.showarea = 0;">
									<div>深圳市</div>
									<div class="clear"></div>
							</div>
						</div>
						<div class="jy-3">
							<div class="yuyue-duan" style="width:auto" ng-click="selectarea('上海市','上海市','');pagedata.showarea = 0;">
									<div>上海市</div>
									<div class="clear"></div>
							</div>
						</div>
						<div class="jy-3">
							<div class="yuyue-duan" style="width:auto" ng-click="selectarea('广东省','东莞市','');pagedata.showarea = 0;">
									<div>东莞市</div>
									<div class="clear"></div>
							</div>
						</div>
						<div class="jy-3">
							<div class="yuyue-duan" style="width:auto" ng-click="selectarea('北京市','北京市','');pagedata.showarea = 0;">
									<div>北京市</div>
									<div class="clear"></div>
							</div>
						</div>
						<div class="jy-3">
							<div class="yuyue-duan" style="width:auto" ng-click="selectarea('江苏省','南京市','');pagedata.showarea = 0;">
									<div>南京市</div>
									<div class="clear"></div>
							</div>
						</div>
						<div class="jy-3">
							<div class="yuyue-duan" style="width:auto" ng-click="selectarea('江苏省','杭州市','');pagedata.showarea = 0;">
									<div>杭州市</div>
									<div class="clear"></div>
							</div>
						</div>
				</div>
			</div>
			<div ng-repeat="(value,data) in pagedata.province">
				<div class="weui_cells_title">{{value}}</div>
				<div class="weui_cells">
					<div class="row margin0">
						<div class="jy-3" ng-repeat="(city,data) in pagedata.province[value]">
								<div class="yuyue-duan" style="width:auto" ng-click="selectarea(value,city,'');pagedata.showarea = 0;">
										<div>{{city || '无'}}</div>
										<div class="clear"></div>
								</div>
						</div>
					</div>
				</div>
		    </div>
</div>
</div>
<script type="text/javascript">
scope.loading = true;  //状态标记
//滚动加载
scope.scroll(function(){
	scope.loading = true;  //状态标记
	scope.$apply();
	setTimeout('getlist()',2000);
},false,'svposttext');
// 百度地图API功能
window.scope.location(function(res){
	if(!scope.pagedata.pcd.city){
		scope.$apply(function(){
			scope.pagedata.pcd.province = res.addressComponents.province;
			scope.pagedata.pcd.city = res.addressComponents.city;
		});
	}
	//getlist(res.lat_lng);
});
scope.selectarea = function(province,city,district){
	//scope.$apply(function(){
		scope.pagedata.pcd.province = province;
		scope.pagedata.pcd.city = city;
		scope.pagedata.pcd.district = district;
		getlist(province,city);
	//});
}
var page = 1;
scope.pagedata.goodslist =[];
getgoodslist();
function getgoodslist(){
		scope.get_data(function(res){
			scope.pagedata.goodslist = res.indexrecommands
				
		},'',{'plugin':'jy_weishop','action':'index'});
}
function getlist(province,city){
		var params = {
					'plugin':'jy_gohome',
					'action':'index',
					'op':'getlist',
					'data':{
						'province':province,
						'city':city,
					},
					'callback':function(data){
							if(data.error !=1){
							scope.pagedata.serve_show =[];
							scope.pagedata.worker_show =[];
							 for (var i=0;i<data.serve_show.length;i++){
									scope.pagedata.serve_show.push(data.serve_show[i]);
								} 
								for (var j=0;j<data.worker_show.length;j++){
									scope.pagedata.worker_show.push(data.worker_show[j]);
								
								}
								if(page >1){
									$(".merchgroup").animate({scrollTop:0},300);
								}
								page++;
								scope.loading = false;
								scope.$apply();
							}else{
								onsole.log('error');
							};
					}
		}
		scope.post_json(params);
}

//手机软键盘--搜索
$("body").keydown(function() {
    if (event.keyCode == "13") {
        $('#searchsub').click();
    }
});
</script>
<script>
	require(['bootstrap', 'hammer'], function($, Hammer){
		$('#carousel-container').carousel();
		var mc = new Hammer($('#carousel-container').get(0));
		mc.on("panleft", function(ev) {
			$('#carousel-container').carousel('next');
		});
		mc.on("panright", function(ev) {
			$('#carousel-container').carousel('prev');
		});
	});
</script>
<div ng-include="sys_html('_footer')"></div>